﻿#region 命名空间

using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using WinnerCMS.Common;

#endregion

namespace WinnerCMS.BLL.Rights
{
    [Serializable]
    public class RightsMap
    {
        public List<PageMap> PageMaps { get; set; }

        public List<ControlMap> ControlMaps { get; set; }

        public List<DataControlMap> DataControlMaps { get; set; }
    }


    [Serializable]
    public class PageMap
    {
        public PageMap()
        {
            AllMacth = false;
            Codes = new List<string>();
            IsMacthMID = true;
            AbsolutePath = "";
        }

        public string AbsolutePath { get; set; }


        public bool IsMacthMID { get; set; }

        /// <summary>
        /// 授权需要的代码列表
        /// </summary>
        public List<string> Codes { get; set; }

        public bool AllMacth { get; set; }
    }

    [Serializable]
    public class ControlMap
    {
        private string _Code = "";

        public ControlMap()
        {
            Controls = new List<string>();
            AllMacth = false;
            AbsolutePath = "";
            IsMacthMID = true;
        }

        public List<string> Controls { get; set; }

        public string AbsolutePath { get; set; }

        public bool IsMacthMID { get; set; }

        /// <summary>
        /// 授权需要的代码列表
        /// </summary>
        public string Code
        {
            get
            {
                if (this._Code == null) return string.Empty;
                return this._Code;
            }
            set { this._Code = value; }
        }

        public bool AllMacth { get; set; }
    }

    [Serializable]
    public class DataControlMap
    {
        public DataControlMap()
        {
            Control = "";
            Message = "";
            AllMacth = false;
            IsMacthMID = true;
            AbsolutePath = "";
            ChildControl = "";
        }


        public string Control { get; set; }

        public string ChildControl { get; set; }

        public string AbsolutePath { get; set; }

        public bool IsMacthMID { get; set; }

        /// <summary>
        /// 授权需要的代码列表
        /// </summary>
        public string Code { get; set; }

        public bool AllMacth { get; set; }

        public string Message { get; set; }
    }
}